package org.tst.service;

import org.tst.controller.Country;
import org.tst.controller.Site;

/**
 * 戶政pass or Retry基底執行URL元件
 * 
 * @author Andy
 * 
 */
public abstract class BaseAction {
	private Country county;
	private Site site;
	private LoadWebCompont loadWebCompont = new LoadWebCompontImpl();
	private String msg;

	public BaseAction(Country county, Site site, String msg) {
		super();
		this.site = site;
		this.county = county;
		this.msg = msg;
	}

	public Country getCounty() {
		return county;
	}

	public void setCounty(Country county) {
		this.county = county;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Site getSite() {
		return site;
	}

	public void setSite(Site site) {
		this.site = site;
	}

	public abstract String getUrl();

	public String doTask() {

		try {
			return this.loadWebCompont.getContent(this.getUrl());
		} catch (Exception e) {

			e.printStackTrace();
		}
		return "";

	}

}
